<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>jquery源码解析视频83-1</title>
    <script src="../jquery-2.0.3.js?v=1"></script>
  </head>

  <body>
    <!-- <div>4444</div> -->
    <span></span>
    <span></span>
    <span></span>
    <div>div</div>
    <script>
      $(function () {
        // 向某元素前面插入元素
        // $("div").before($("<span>1111</span>"));

        // 向某元素后面插入元素
        // $("div").after($("<span>2222</span>"));

        // $("div").append($("<span>3333</span>"));
        // $("div").prepend($("<span>5555</span>"));

        // $("span").append(function () {
        //   return "Hello World!";
        // });

        // $("span").append($("div"));

        $("span").append("<script>alert(456)<\/script>");
      });
    </script>
    <script>
      // alert(121122);
    </script>
  </body>
</html>
